/* PhotoViewer */

#import <Cocoa/Cocoa.h>

#import "PhotoBase.h"
#import "ViewerBase.h"


@class FolderModel;


#define PREF_VIEWER_FRAME_RECT	@"Viewer.frameRect"


@interface PhotoViewer : ViewerBase
{
	// Contains the ThumbData for the current folder
	FolderModel		*folderModel;

	// Our current index into the images.
	int				imageIndex;

	// The name of the current image (used in response to notifications)
	NSString		*curImageName;

	int				sortBy;

	// Number of images in a "page" (page up/down jump around by this much).
	int				pageSize;
}

- (IBAction) firstImage:(id)sender;
- (IBAction) getInfo:(id)sender;
- (IBAction) jumpToImage:(id)sender;
- (IBAction) lastImage:(id)sender;
- (IBAction) nextImage:(id)sender;
- (IBAction) openContainingFolder:(id)sender;
- (IBAction) previousImage:(id)sender;
- (IBAction) refresh:(id)sender;
- (IBAction) revealInFinder:(id)sender;
- (IBAction) setThumbStripState:(id)sender;
- (IBAction) showDate:(id)sender;
- (IBAction) showFileSize:(id)sender;
- (IBAction) showImageSize:(id)sender;
- (IBAction) showName:(id)sender;
- (IBAction) sortByDates:(id)sender;
- (IBAction) sortByNames:(id)sender;
- (IBAction) sortByThumbStates:(id)sender;
- (IBAction) sortByTypes:(id)sender;

- (void) pageBackward;
- (void) pageForward;


- (void) replaceFolderModel:(FolderModel *) fm;

- (void) setImageStrings:(NSString *) fullFilename index:(int) index;

- (void) openImageFile:(NSString *) path showImage:(BOOL) showImage;
- (BOOL) showFile:(int) index;
- (int) getNextIndex:(int) diff;
- (int) ensureInBounds:(int) index;

- (void) updateColors;

- (void) setThumbViewState:(int) newState;
- (void) thumbViewCurrentIndexChanged:(NSNotification*)note;

@end
